#include "vector.h"

void test1()
{
	txp::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(6);
	v1.pop_back();
	v1.pop_back();
	v1.pop_back();
	v1.pop_back();


	for (size_t i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;

	auto it1 = v1.begin();
	while (it1 != v1.end())
	{
		cout << *it1 << " ";
		++it1;
	}
	cout << endl;

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;
}

void test2()
{
	txp::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	v1.insert(v1.begin() + 2, 88);

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	txp::vector<int> v2 = { 1,2,3,4,5,6,7 };
	for (auto& e : v2)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	//test1();
	test2();

	return 0;
}
